package com.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.dao.IBisMItemDao;
import com.model.Bis_m_item;
import com.model.Bis_m_itemId;
import com.model.Bis_m_label;

@Repository
public class BisMItemHibernateDao extends
		GenericHibernateDao<Bis_m_item, Bis_m_itemId> implements IBisMItemDao {

	public List<Bis_m_item> getMItemListByMLabel(Bis_m_label bis_m_label) {
		String strHqlInParam="from Bis_m_item a where id.tool_id_fk = ? and id.rep_unit_fk = ? and id.data_pat_fk = ? and id.mes_id_fk =? ";
		List<Bis_m_item> bis_m_itemList = this.find(strHqlInParam, 
				new String[]{bis_m_label.getId().getTool_id_fk(),
				bis_m_label.getId().getRep_unit(),
				bis_m_label.getId().getData_pat(),
				bis_m_label.getId().getMes_id_fk()});
		return bis_m_itemList;
	}

}
